package cn.bytepulse.web.api.controller;

import cn.bytepulse.annotation.Commercial;
import cn.bytepulse.pojo.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * v1版本接口
 *
 * @author jiejiebiezheyang
 * @since 2025-04-08 12:00
 */
@Tag(name = "v1版本接口")
@Commercial
@RestController
@RequestMapping("/api/v1")
public class V1Controller {

    @PostMapping("/test")
    @Operation(summary = "获取0-100随机数")
    public AjaxResult test(@RequestBody TestData testData) {
        return AjaxResult.success(testData);
    }

    @Data
    public static class TestData {
        private Integer age = 18;
        private String name = "";

    }
}
